﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace Infrastructure.Interface
{
    /// <summary>
    /// 定义管理添加实体到数据库的接口
    /// <remarks></remarks>
    /// </summary>
    /// <typeparam name="T">实体类型</typeparam>
    public interface IAddable<T> where T : IEntity
    {
        /// <summary>
        /// 添加实体
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        void Add(T entity);

        /// <summary>
        /// 添加实体
        /// </summary>
        /// <param name="entitys">多个实体</param>
        /// <returns></returns>
        void Add(IEnumerable<T> entitys);

    }
}
